package com.reamework.cat.controller;/**
 * @author dongsufeng
 * @date 2019/9/27 17:51
 * @version 1.0
 */

import com.dianping.cat.Cat;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author dongsufeng
 * @date 2019/9/27 17:51
 * @version 1.0
 */
@RestController
@Log4j2
public class CatController {

	@PostMapping("cat-http2")
	public String call(){
		log.info("===================cat-http2");
		return "http1";
	}
	@PostMapping("cat-http2-error")
	public String httpError(){
		log.info("===================cat-http2-error");
		try {
			int i=1/0;
		} catch (Exception e) {
			Cat.logError(e);
		}
		return "http2-error";
	}
}
